<?php

namespace app\admin\validate;
use think\Validate;

class banks extends Validate
{
    protected $rule = [
        'name'          => 'require|chsDash|unique:banks',
        'code'        => 'require|alpha|unique:banks',
    ];

    protected $message = [
        'name.require'          => '银行名称不能为空',
        'name.chsDash'          => '银行名称不能有特殊字符',
        'name.unique'           => '银行名称已存在',
        'code.require'          => '银行简称不能为空',
        'code.alpha'            => '银行简称必须为字母',
        'code.unique'           => '银行简称已存在',
    ];
}
